<?php
define('ROOT_PATH', dirname( __FILE__ ));
//require_once(ROOT_PATH.'libs/db.php');
require_once(ROOT_PATH.'/libs/simple_html_dom.php');
require_once(ROOT_PATH.'/libs/db.php');
require_once(ROOT_PATH.'/libs/cf.php');

$hour = (isset($_GET['h'])) ? (int) $_GET['h'] : (int) date('G');
var_dump($hour);

/* start coccoc */

$arrCNF['coccoc'] = ROOT_PATH.'/site/coccoc.php';

$arrCall[0][0] = 'test';
$arrCall[0][1] = 'coccoc';

/* end coccoc */

if($arrCall[$hour]){
    require_once($arrCNF[$arrCall[$hour][1]]);
    call_user_func($arrCall[$hour][0]);
}else{
    require_once($arrCNF[$arrCall[0][1]]);
    call_user_func($arrCall[0][0]);
}